package com.swak.frame.extension.provider;

import java.util.Set;

import com.swak.frame.context.BoundContext;
import com.swak.frame.extension.provider.ExtensionConfigProvider;
import com.swak.frame.util.EmptyObject;

public interface WhiteListExtPtProvider extends ExtensionConfigProvider<BoundContext, Set<String>> {

	public static final String WHITE_LIST_BIZ_ID = "whiteList";

	/** 白名单配置的KEY **/
	public static final String BIZ_WHITE_LIST_CONFIG = "whiteList";

	/** 白名单开关KEY **/
	public static final String WHITE_LIST_ENABLED = "whiteList_enabled";

	/** 独立开启白名单的接口 **/
	public static final String WHITE_LIST_AUTHCODE = "whiteList_authCode";

	/**
	 * 获取需要开启白名单的接口
	 * 
	 * @param @param  resource
	 * @param @return
	 * @return Set<String>
	 */
	default Set<String> getAuthCode(BoundContext resource) {
		return EmptyObject.emptySet();
	};

	default public boolean enableByVer(BoundContext resource) {
		return false;
	}
}
